﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Abp.Dependency;
using RabbitMQ.Client;

namespace Abp.Rebus.Rabbit
{
    public interface IRabbitMqConnetionManager : IDisposable, ITransientDependency
    {
        IConnection Connection { get; }

        IModel Model { get; }

        void Publish(Object message, string routingKey = "Abp.Rebus.Auditing.AuditMessage, Abp.Rebus");

        /// <summary>
        /// 发布消息到固定的队列
        /// </summary>
        /// <param name="jsonMessage"></param>
        /// <param name="routeKey"></param>
        /// <param name="exchange"></param>
        void Direct(RebusMessageAdapter message);
    }

}
